package com.yiqixue.orderservice.client;

import com.yiqixue.orderservice.model.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(name = "productservice", configuration = FeignClientConfig.class)
public interface ProductServiceClient {
    @GetMapping("/api/products/{id}")
    Product getProductById(@PathVariable Long id);

    @PutMapping("/api/products/{id}/stock")
    Product updateStock(@PathVariable Long id, @RequestParam Integer quantity);
} 